//
//  CallBackSeltQuestionCell.swift
//  d11
//
//  Created by peale_pro on 2019/10/16.
//  Copyright © 2019 Tech_001. All rights reserved.
//

import UIKit

class CallBackSeltQuestionCell: UITableViewCell {
    var titleLabel : UILabel?
    var bgBtn1: UIButton?
    var bgBtn2: UIButton?
    var iconImgView1: UIImageView?
    var iconImgView2: UIImageView?
    var titleLabel1:UILabel?
    var titleLabel2:UILabel?
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = UITableViewCell.SelectionStyle.none
        self.setUpUI()

    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    func setUpUI() -> Void {
        self.titleLabel = UILabel.init()
        self.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        self.titleLabel?.text = "问题:"
        self.titleLabel?.textAlignment = .left
        self.titleLabel?.textColor = HexRGBAlpha(0x444444, 1)
        self.contentView.addSubview(self.titleLabel!)
        self.titleLabel?.snp.makeConstraints{(make) in
            make.left.equalToSuperview().offset(12)
            make.right.equalToSuperview().offset(-12)
            make.height.equalTo(20)
            make.top.equalToSuperview()
        }
        
        self.bgBtn1 = UIButton.init(type: .custom)
        self.bgBtn1?.layer.cornerRadius = 4
        self.bgBtn1?.layer.masksToBounds = true
        self.bgBtn1?.layer.borderColor = HexRGBAlpha(0x888888, 1).cgColor
        self.bgBtn1?.layer.borderWidth = 1
        self.contentView.addSubview(self.bgBtn1!)
        self.bgBtn1?.snp.makeConstraints{(make) in
            make.left.equalToSuperview().offset(12)
            make.right.equalToSuperview().offset(-12)
            make.height.equalTo(40)
            make.top.equalTo((self.titleLabel?.snp.bottom)!).offset(10)
        }
        
        self.iconImgView1 = UIImageView.init(image: UIImage.init(named: "icon_kefu_submit_arrow"))
        self.bgBtn1?.addSubview(self.iconImgView1!)
        self.iconImgView1?.snp.makeConstraints{(make) in
            make.right.equalToSuperview().offset(-12)
            make.height.equalTo(6)
            make.width.equalTo(6)
            make.centerY.equalToSuperview()
        }
        
        self.titleLabel1 = UILabel.init()
        self.titleLabel1?.font = UIFont.systemFont(ofSize: 15)
        self.titleLabel1?.text = "--- 请选择 ---"
        self.titleLabel1?.textAlignment = .left
        self.titleLabel1?.textColor = HexRGBAlpha(0x444444, 1)
        self.bgBtn1?.addSubview(self.titleLabel1!)
        self.titleLabel1?.snp.makeConstraints{(make) in
            make.left.equalToSuperview().offset(12)
            make.right.equalTo((self.iconImgView1?.snp.left)!).offset(-12)
            make.height.equalTo(20)
            make.centerY.equalToSuperview()
        }
        
        self.bgBtn2 = UIButton.init(type: .custom)
        self.bgBtn2?.layer.cornerRadius = 4
        self.bgBtn2?.layer.masksToBounds = true
        self.bgBtn2?.layer.borderColor = HexRGBAlpha(0x888888, 1).cgColor
        self.bgBtn2?.layer.borderWidth = 1
        self.contentView.addSubview(self.bgBtn2!)
        self.bgBtn2?.snp.makeConstraints{(make) in
            make.left.equalToSuperview().offset(12)
            make.right.equalToSuperview().offset(-12)
            make.height.equalTo(40)
            make.top.equalTo((self.bgBtn1?.snp.bottom)!).offset(5)
        }
        
        self.iconImgView2 = UIImageView.init(image: UIImage.init(named: "icon_kefu_submit_arrow"))
        self.bgBtn2?.addSubview(self.iconImgView2!)
        self.iconImgView2?.snp.makeConstraints{(make) in
            make.right.equalToSuperview().offset(-12)
            make.height.equalTo(6)
            make.width.equalTo(6)
            make.centerY.equalToSuperview()
        }
        
        self.titleLabel2 = UILabel.init()
        self.titleLabel2?.font = UIFont.systemFont(ofSize: 15)
        self.titleLabel2?.text = "--- 请选择 ---"
        self.titleLabel2?.textAlignment = .left
        self.titleLabel2?.textColor = HexRGBAlpha(0x444444, 1)
        self.bgBtn2?.addSubview(self.titleLabel2!)
        self.titleLabel2?.snp.makeConstraints{(make) in
            make.left.equalToSuperview().offset(12)
            make.right.equalTo((self.iconImgView2?.snp.left)!).offset(-12)
            make.height.equalTo(20)
            make.centerY.equalToSuperview()
        }
    }

}
